﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>



<form id="pagerForm" method="post" action="<%=basePath%>fuel_getFuel.action">
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" />
	<input type="hidden" name="pageNum" value="${pageNum}" />
	<input type="hidden" name="numPerPage" value="${model.numPerPage}" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
	<input type="hidden" name="orderDirection" value="${param.orderDirection}" />
</form>


<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<%=basePath%>fuel_getFuel.action" 
	method="post" class="pageForm required-validate">
	<div class="searchBar">
		<div class="pageFormContent1" >
				<input type="hidden" name="pageNum" value="1" />
				<p>
					<label>起始日期：</label>
					<input type="text" id="s_date" name="s_date" class="date" value="${s_date}"/>
				</p>
				<p>
					<label>结束日期：</label>
					<input type="text" name="e_date" class="date" value="${e_date}"/>
				</p>
				<p>
				<label>类别名称：</label>
				<select name="class_name" class="required combox">
					<option value="" selected>请选择渠道类别名称</option>
					<c:forEach items="${channelClasses}" var="pClasse">
						<option id="${pClasse.PClassName}" value="${pClasse.PClassName}">${pClasse.PClassName}</option>	
					</c:forEach>
				</select>
				<input type="hidden" id="cname" value="${class_name}"/>
			</p>
		</div>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">&nbsp;&nbsp;查&nbsp;询&nbsp;&nbsp;</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<%=basePath%>backgroundManager/pricemanager/Channel/AddFuel.jsp" target="dialog" rel="Add_Fuel"><span>添加燃油</span></a></li>
			<li><a class="delete" href="<%=basePath%>fuel_deleteFuel.action" posttype="string" rel="fuel_ids" target="selectedTodo" title="确定要删除吗?"><span>删除燃油</span></a></li>
			<li><a class="edit" href="<%=basePath%>fuel_getEditFuel.action?fuelId={sid_user}" target="dialog" rel="Edit_Fuel"><span>修改燃油</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="164">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="fuel_ids" class="checkboxCtrl"></th>
				<th width="150" orderField="o_class_name" class="${orderDirection}">渠道类别</th>
				<th width="150" orderField="o_s_date" class="${orderDirection}">起始日期</th>
				<th width="150" orderField="o_e_date" class="${orderDirection}">结束日期</th>
				<th width="150" orderField="o_cost" class="${orderDirection}">燃油</th>
				<th width="150" orderField="o_add_date" class="${orderDirection}">添加日期</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${fuelBeans}" var="fuelBean">
				<tr target="sid_user" rel="${fuelBean.PFuelId }">
					<td><input name="fuel_ids" value="${fuelBean.PFuelId }" type="checkbox"></td>
					<td>${fuelBean.PClassName }</td>
					<td>${fuelBean.PFuelSDate }</td>
					<td>${fuelBean.PFuelEDate }</td>
					<td>${fuelBean.PFuelCost }</td>
					<td>${fuelBean.PFuelAddDate }</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option id="5" value="5">5</option>
				<option id="10" value="10">10</option>
				<option id="50" value="50">50</option>
				<option id="100" value="100">100</option>
				<option id="200" value="200">200</option>
			</select>
			<span>条，共${rowTotal}条</span>
			<input type="hidden" id="NPP" value="${numPerPage}"/>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${rowTotal}" numPerPage="${numPerPage}" pageNumShown="10" currentPage="${pageNum}"></div>

	</div>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		var cn = document.getElementById("cname").value
		document.getElementById(cn).selected = "true";
	});
</script>
<script type="text/javascript">
	$(document).ready(function(){
		var npp = document.getElementById("NPP").value;
		document.getElementById(npp).selected = "true";
	});
</script>

